myObject = {
    630501: function(t, e) {
    var n, r, o;
    "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self && self,
    r = [],
    void 0 === (o = "function" == typeof (n = function() {
        function e(t) {
            return t && t.__esModule ? t : {
                default: t
            }
        }
        t.exports = e,
        t.exports.__esModule = !0,
        t.exports.default = t.exports
    }
    ) ? n.apply(e, r) : n) || (t.exports = o)
},
}




const fs = require('fs');
const keysToKeep = [
    506986,
    35333,
    638676,
    515823,
    630501,
    853792,
    702963,
    370723,
    242634,
    4091,
    558211,
    108429,
    773044,
    313791,
    845469,
    776210,
    69050,
    23132,
    155849,
    765410,
    488112,
    270996,
    254266,
    321056,
    665643,
    763421,
    58151,
    74431,
    327837,
    437472,
    179886,
    449439,
    822033,
    416708,
    881728,
    656402,
    345223,
    447197,
    418852,
    663911,
    334912,
    70453,
    138170,
    36321,
    912554,
    949788,
    538933,
    293776,
    585580,
    373257,
    503560,
    81511,
    302543,
    379159,
    513263,
    69336,
    283665,
    415778,
    559211,
    237188,
    385069,
    252110,
    691591,
    484720,
    862250,
    853920,
    675033,
    574188,
    482291,
    146294,
    480885,
    18600,
    553215,
    328323,
    389592,
  ]

  
  


// 构建新的JavaScript代码字符串
let jsFileContent = 'const newObject = {\n';

keysToKeep.forEach(key => {
    if (myObject.hasOwnProperty(key) && typeof myObject[key] === 'function') {
        // 如果键是数字，直接使用数字字面量；如果是字符串，则需要用引号括起来（但这里我们只处理数字键的情况）
        // 由于我们已知键是数字（根据keysToKeep的定义），所以直接写数字
        jsFileContent += `    ${key}: ${myObject[key].toString()},\n`;
    }
});

// 移除最后一个逗号并添加结尾的大括号
jsFileContent = jsFileContent.slice(0, -2) + '\n};\n';

// 将这个JavaScript代码写入文件
fs.writeFile('output.js', jsFileContent, 'utf8', (err) => {
    if (err) {
        console.error('Error writing JavaScript file:', err);
    } else {
        console.log('JavaScript file has been saved.');
    }
});
